3.255 \(\int \frac{(A+B x) (a+c x^2)}{x} \, dx\)

Optimal. Leaf size=28 \[ a A \log (x)+a B x+\frac{1}{2} A c x^2+\frac{1}{3} B c x^3 \]

[Out]

a*B*x + (A*c*x^2)/2 + (B*c*x^3)/3 + a*A*Log[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0103621, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.062, Rules used = {766} \[ a A \log (x)+a B x+\frac{1}{2} A c x^2+\frac{1}{3} B c x^3 \]

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(a + c*x^2))/x,x]

[Out]

a*B*x + (A*c*x^2)/2 + (B*c*x^3)/3 + a*A*Log[x]

Rule 766

Int[((e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(e*x
)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, e, f, g, m}, x] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{(A+B x) \left (a+c x^2\right )}{x} \, dx &=\int \left (a B+\frac{a A}{x}+A c x+B c x^2\right ) \, dx\\ &=a B x+\frac{1}{2} A c x^2+\frac{1}{3} B c x^3+a A \log (x)\\ \end{align*}

Mathematica [A]  time = 0.0032735, size = 28, normalized size = 1. \[ a A \log (x)+a B x+\frac{1}{2} A c x^2+\frac{1}{3} B c x^3 \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(a + c*x^2))/x,x]

[Out]

a*B*x + (A*c*x^2)/2 + (B*c*x^3)/3 + a*A*Log[x]

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 25, normalized size = 0.9 \begin{align*} aBx+{\frac{Ac{x}^{2}}{2}}+{\frac{Bc{x}^{3}}{3}}+aA\ln \left ( x \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(c*x^2+a)/x,x)

[Out]

a*B*x+1/2*A*c*x^2+1/3*B*c*x^3+a*A*ln(x)

________________________________________________________________________________________

Maxima [A]  time = 1.02557, size = 32, normalized size = 1.14 \begin{align*} \frac{1}{3} \, B c x^{3} + \frac{1}{2} \, A c x^{2} + B a x + A a \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/x,x, algorithm="maxima")

[Out]

1/3*B*c*x^3 + 1/2*A*c*x^2 + B*a*x + A*a*log(x)

________________________________________________________________________________________

Fricas [A]  time = 1.51855, size = 65, normalized size = 2.32 \begin{align*} \frac{1}{3} \, B c x^{3} + \frac{1}{2} \, A c x^{2} + B a x + A a \log \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/x,x, algorithm="fricas")

[Out]

1/3*B*c*x^3 + 1/2*A*c*x^2 + B*a*x + A*a*log(x)

________________________________________________________________________________________

Sympy [A]  time = 0.350664, size = 27, normalized size = 0.96 \begin{align*} A a \log{\left (x \right )} + \frac{A c x^{2}}{2} + B a x + \frac{B c x^{3}}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x**2+a)/x,x)

[Out]

A*a*log(x) + A*c*x**2/2 + B*a*x + B*c*x**3/3

________________________________________________________________________________________

Giac [A]  time = 1.11033, size = 34, normalized size = 1.21 \begin{align*} \frac{1}{3} \, B c x^{3} + \frac{1}{2} \, A c x^{2} + B a x + A a \log \left ({\left | x \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/x,x, algorithm="giac")

[Out]

1/3*B*c*x^3 + 1/2*A*c*x^2 + B*a*x + A*a*log(abs(x))